<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <rich:panel>
        <f:facet name="header">State Details</f:facet>


        <s:decorate id="name" template="layout/display.xhtml">
            <ui:define name="label">Name</ui:define>
            <h:outputText value="#{stateHome.instance.name}"/>
        </s:decorate>

        <s:decorate id="code" template="layout/display.xhtml">
            <ui:define name="label">Code</ui:define>
            <h:outputText value="#{stateHome.instance.code}"/>
        </s:decorate>

        <div style="clear:both"/>

    </rich:panel>

    <div class="actionButtons">

        <s:button view="/StateEdit.xhtml"
                    id="edit"
                 value="Edit"/>

        <s:button view="/#{empty stateFrom ? 'StateList' : stateFrom}.xhtml"
                    id="done"
                 value="Done"/>

    </div>

    <rich:tabPanel switchType="ajax">

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/manytoone.gif" style="vertical-align: middle; padding-right: 4px;"/>Country</h:panelGroup>
        </f:facet>
    <div class="association" id="countryParent">

        <h:outputText value="There is no country associated with this state."
                   rendered="#{stateHome.instance.country == null}"/>

        <rich:dataTable var="_country"
                   value="#{stateHome.instance.country}"
                rendered="#{stateHome.instance.country != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="countryTable">
            <h:column>
                <f:facet name="header">Id country</f:facet>
                <h:outputText value="#{_country.idCountry}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Name</f:facet>
                <h:outputText value="#{_country.name}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Code</f:facet>
                <h:outputText value="#{_country.code}"/>
            </h:column>
            <h:column styleClass="action">
                <f:facet name="header">Action</f:facet>
                <s:link id="viewcountry"
                     value="View"
                      view="/Country.xhtml">
                    <f:param name="countryIdCountry"
                           value="#{_country.idCountry}"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Requests for from state</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="requestsForFromStateChildren">

        <h:outputText value="There are no requestsForFromState associated with this state."
                   rendered="#{empty stateHome.requestsForFromState}"/>

        <rich:dataTable value="#{stateHome.requestsForFromState}"
                       var="_request"
                  rendered="#{not empty stateHome.requestsForFromState}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="requestsForFromStateTable">
            <rich:column sortBy="#{_request.idRequest}">
                <f:facet name="header">Id request</f:facet>
                <h:outputText value="#{_request.idRequest}"/>
            </rich:column>
            <rich:column sortBy="#{_request.name}">
                <f:facet name="header">Name</f:facet>
                <h:outputText value="#{_request.name}"/>
            </rich:column>
            <rich:column sortBy="#{_request.fromLat}">
                <f:facet name="header">From lat</f:facet>
                <h:outputText value="#{_request.fromLat}"/>
            </rich:column>
            <rich:column sortBy="#{_request.fromLon}">
                <f:facet name="header">From lon</f:facet>
                <h:outputText value="#{_request.fromLon}"/>
            </rich:column>
            <rich:column sortBy="#{_request.toLat}">
                <f:facet name="header">To lat</f:facet>
                <h:outputText value="#{_request.toLat}"/>
            </rich:column>
            <rich:column sortBy="#{_request.toLon}">
                <f:facet name="header">To lon</f:facet>
                <h:outputText value="#{_request.toLon}"/>
            </rich:column>
            <rich:column sortBy="#{_request.distance}">
                <f:facet name="header">Distance</f:facet>
                <h:outputText value="#{_request.distance}"/>
            </rich:column>
            <rich:column sortBy="#{_request.beginDate}">
                <f:facet name="header">Begin date</f:facet>
                <h:outputText value="#{_request.beginDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_request.endDate}">
                <f:facet name="header">End date</f:facet>
                <h:outputText value="#{_request.endDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_request.singleDay}">
                <f:facet name="header">Single day</f:facet>
                <h:outputText value="#{_request.singleDay}"/>
            </rich:column>
            <rich:column sortBy="#{_request.monday}">
                <f:facet name="header">Monday</f:facet>
                <h:outputText value="#{_request.monday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.tuesday}">
                <f:facet name="header">Tuesday</f:facet>
                <h:outputText value="#{_request.tuesday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.wednesday}">
                <f:facet name="header">Wednesday</f:facet>
                <h:outputText value="#{_request.wednesday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.thursday}">
                <f:facet name="header">Thursday</f:facet>
                <h:outputText value="#{_request.thursday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.friday}">
                <f:facet name="header">Friday</f:facet>
                <h:outputText value="#{_request.friday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.saturday}">
                <f:facet name="header">Saturday</f:facet>
                <h:outputText value="#{_request.saturday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.sunday}">
                <f:facet name="header">Sunday</f:facet>
                <h:outputText value="#{_request.sunday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.cronExpression}">
                <f:facet name="header">Cron expression</f:facet>
                <h:outputText value="#{_request.cronExpression}"/>
            </rich:column>
            <rich:column sortBy="#{_request.createDate}">
                <f:facet name="header">Create date</f:facet>
                <h:outputText value="#{_request.createDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_request.modifyDate}">
                <f:facet name="header">Modify date</f:facet>
                <h:outputText value="#{_request.modifyDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_request.deleteDate}">
                <f:facet name="header">Delete date</f:facet>
                <h:outputText value="#{_request.deleteDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectrequest"
                     value="Select"
                      view="/Request.xhtml">
                    <f:param name="requestIdRequest"
                            value="#{_request.idRequest}"/>
                    <f:param name="requestFrom" value="State"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add request"
                view="/RequestEdit.xhtml">
            <f:param name="stateIdState"
                    value="#{stateHome.instance.idState}"/>
            <f:param name="requestFrom" value="State"/>
        </s:button>
    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Travels for to state</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="travelsForToStateChildren">

        <h:outputText value="There are no travelsForToState associated with this state."
                   rendered="#{empty stateHome.travelsForToState}"/>

        <rich:dataTable value="#{stateHome.travelsForToState}"
                       var="_travel"
                  rendered="#{not empty stateHome.travelsForToState}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="travelsForToStateTable">
            <rich:column sortBy="#{_travel.idTravel}">
                <f:facet name="header">Id travel</f:facet>
                <h:outputText value="#{_travel.idTravel}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.name}">
                <f:facet name="header">Name</f:facet>
                <h:outputText value="#{_travel.name}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.fromLat}">
                <f:facet name="header">From lat</f:facet>
                <h:outputText value="#{_travel.fromLat}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.fromLon}">
                <f:facet name="header">From lon</f:facet>
                <h:outputText value="#{_travel.fromLon}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.toLat}">
                <f:facet name="header">To lat</f:facet>
                <h:outputText value="#{_travel.toLat}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.toLon}">
                <f:facet name="header">To lon</f:facet>
                <h:outputText value="#{_travel.toLon}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.distance}">
                <f:facet name="header">Distance</f:facet>
                <h:outputText value="#{_travel.distance}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.travelState}">
                <f:facet name="header">Travel state</f:facet>
                <h:outputText value="#{_travel.travelState}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.calculatedRate}">
                <f:facet name="header">Calculated rate</f:facet>
                <h:outputText value="#{_travel.calculatedRate}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.createDate}">
                <f:facet name="header">Create date</f:facet>
                <h:outputText value="#{_travel.createDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_travel.modifyDate}">
                <f:facet name="header">Modify date</f:facet>
                <h:outputText value="#{_travel.modifyDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_travel.deleteDate}">
                <f:facet name="header">Delete date</f:facet>
                <h:outputText value="#{_travel.deleteDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_travel.cronExpression}">
                <f:facet name="header">Cron expression</f:facet>
                <h:outputText value="#{_travel.cronExpression}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.monday}">
                <f:facet name="header">Monday</f:facet>
                <h:outputText value="#{_travel.monday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.tuesday}">
                <f:facet name="header">Tuesday</f:facet>
                <h:outputText value="#{_travel.tuesday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.wednesday}">
                <f:facet name="header">Wednesday</f:facet>
                <h:outputText value="#{_travel.wednesday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.thursday}">
                <f:facet name="header">Thursday</f:facet>
                <h:outputText value="#{_travel.thursday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.friday}">
                <f:facet name="header">Friday</f:facet>
                <h:outputText value="#{_travel.friday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.saturday}">
                <f:facet name="header">Saturday</f:facet>
                <h:outputText value="#{_travel.saturday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.sunday}">
                <f:facet name="header">Sunday</f:facet>
                <h:outputText value="#{_travel.sunday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.beginDate}">
                <f:facet name="header">Begin date</f:facet>
                <h:outputText value="#{_travel.beginDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_travel.endDate}">
                <f:facet name="header">End date</f:facet>
                <h:outputText value="#{_travel.endDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_travel.singleDay}">
                <f:facet name="header">Single day</f:facet>
                <h:outputText value="#{_travel.singleDay}"/>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selecttravel"
                     value="Select"
                      view="/Travel.xhtml">
                    <f:param name="travelIdTravel"
                            value="#{_travel.idTravel}"/>
                    <f:param name="travelFrom" value="State"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add travel"
                view="/TravelEdit.xhtml">
            <f:param name="stateIdState"
                    value="#{stateHome.instance.idState}"/>
            <f:param name="travelFrom" value="State"/>
        </s:button>
    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Cities</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="citiesChildren">

        <h:outputText value="There are no cities associated with this state."
                   rendered="#{empty stateHome.cities}"/>

        <rich:dataTable value="#{stateHome.cities}"
                       var="_city"
                  rendered="#{not empty stateHome.cities}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="citiesTable">
            <rich:column sortBy="#{_city.idCity}">
                <f:facet name="header">Id city</f:facet>
                <h:outputText value="#{_city.idCity}"/>
            </rich:column>
            <rich:column sortBy="#{_city.name}">
                <f:facet name="header">Name</f:facet>
                <h:outputText value="#{_city.name}"/>
            </rich:column>
            <rich:column sortBy="#{_city.lat}">
                <f:facet name="header">Lat</f:facet>
                <h:outputText value="#{_city.lat}"/>
            </rich:column>
            <rich:column sortBy="#{_city.lon}">
                <f:facet name="header">Lon</f:facet>
                <h:outputText value="#{_city.lon}"/>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectcity"
                     value="Select"
                      view="/City.xhtml">
                    <f:param name="cityIdCity"
                            value="#{_city.idCity}"/>
                    <f:param name="cityFrom" value="State"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add city"
                view="/CityEdit.xhtml">
            <f:param name="stateIdState"
                    value="#{stateHome.instance.idState}"/>
            <f:param name="cityFrom" value="State"/>
        </s:button>
    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Requests for to state</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="requestsForToStateChildren">

        <h:outputText value="There are no requestsForToState associated with this state."
                   rendered="#{empty stateHome.requestsForToState}"/>

        <rich:dataTable value="#{stateHome.requestsForToState}"
                       var="_request"
                  rendered="#{not empty stateHome.requestsForToState}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="requestsForToStateTable">
            <rich:column sortBy="#{_request.idRequest}">
                <f:facet name="header">Id request</f:facet>
                <h:outputText value="#{_request.idRequest}"/>
            </rich:column>
            <rich:column sortBy="#{_request.name}">
                <f:facet name="header">Name</f:facet>
                <h:outputText value="#{_request.name}"/>
            </rich:column>
            <rich:column sortBy="#{_request.fromLat}">
                <f:facet name="header">From lat</f:facet>
                <h:outputText value="#{_request.fromLat}"/>
            </rich:column>
            <rich:column sortBy="#{_request.fromLon}">
                <f:facet name="header">From lon</f:facet>
                <h:outputText value="#{_request.fromLon}"/>
            </rich:column>
            <rich:column sortBy="#{_request.toLat}">
                <f:facet name="header">To lat</f:facet>
                <h:outputText value="#{_request.toLat}"/>
            </rich:column>
            <rich:column sortBy="#{_request.toLon}">
                <f:facet name="header">To lon</f:facet>
                <h:outputText value="#{_request.toLon}"/>
            </rich:column>
            <rich:column sortBy="#{_request.distance}">
                <f:facet name="header">Distance</f:facet>
                <h:outputText value="#{_request.distance}"/>
            </rich:column>
            <rich:column sortBy="#{_request.beginDate}">
                <f:facet name="header">Begin date</f:facet>
                <h:outputText value="#{_request.beginDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_request.endDate}">
                <f:facet name="header">End date</f:facet>
                <h:outputText value="#{_request.endDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_request.singleDay}">
                <f:facet name="header">Single day</f:facet>
                <h:outputText value="#{_request.singleDay}"/>
            </rich:column>
            <rich:column sortBy="#{_request.monday}">
                <f:facet name="header">Monday</f:facet>
                <h:outputText value="#{_request.monday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.tuesday}">
                <f:facet name="header">Tuesday</f:facet>
                <h:outputText value="#{_request.tuesday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.wednesday}">
                <f:facet name="header">Wednesday</f:facet>
                <h:outputText value="#{_request.wednesday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.thursday}">
                <f:facet name="header">Thursday</f:facet>
                <h:outputText value="#{_request.thursday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.friday}">
                <f:facet name="header">Friday</f:facet>
                <h:outputText value="#{_request.friday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.saturday}">
                <f:facet name="header">Saturday</f:facet>
                <h:outputText value="#{_request.saturday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.sunday}">
                <f:facet name="header">Sunday</f:facet>
                <h:outputText value="#{_request.sunday}"/>
            </rich:column>
            <rich:column sortBy="#{_request.cronExpression}">
                <f:facet name="header">Cron expression</f:facet>
                <h:outputText value="#{_request.cronExpression}"/>
            </rich:column>
            <rich:column sortBy="#{_request.createDate}">
                <f:facet name="header">Create date</f:facet>
                <h:outputText value="#{_request.createDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_request.modifyDate}">
                <f:facet name="header">Modify date</f:facet>
                <h:outputText value="#{_request.modifyDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_request.deleteDate}">
                <f:facet name="header">Delete date</f:facet>
                <h:outputText value="#{_request.deleteDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectrequest"
                     value="Select"
                      view="/Request.xhtml">
                    <f:param name="requestIdRequest"
                            value="#{_request.idRequest}"/>
                    <f:param name="requestFrom" value="State"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add request"
                view="/RequestEdit.xhtml">
            <f:param name="stateIdState"
                    value="#{stateHome.instance.idState}"/>
            <f:param name="requestFrom" value="State"/>
        </s:button>
    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Travels for from state</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="travelsForFromStateChildren">

        <h:outputText value="There are no travelsForFromState associated with this state."
                   rendered="#{empty stateHome.travelsForFromState}"/>

        <rich:dataTable value="#{stateHome.travelsForFromState}"
                       var="_travel"
                  rendered="#{not empty stateHome.travelsForFromState}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="travelsForFromStateTable">
            <rich:column sortBy="#{_travel.idTravel}">
                <f:facet name="header">Id travel</f:facet>
                <h:outputText value="#{_travel.idTravel}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.name}">
                <f:facet name="header">Name</f:facet>
                <h:outputText value="#{_travel.name}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.fromLat}">
                <f:facet name="header">From lat</f:facet>
                <h:outputText value="#{_travel.fromLat}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.fromLon}">
                <f:facet name="header">From lon</f:facet>
                <h:outputText value="#{_travel.fromLon}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.toLat}">
                <f:facet name="header">To lat</f:facet>
                <h:outputText value="#{_travel.toLat}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.toLon}">
                <f:facet name="header">To lon</f:facet>
                <h:outputText value="#{_travel.toLon}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.distance}">
                <f:facet name="header">Distance</f:facet>
                <h:outputText value="#{_travel.distance}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.travelState}">
                <f:facet name="header">Travel state</f:facet>
                <h:outputText value="#{_travel.travelState}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.calculatedRate}">
                <f:facet name="header">Calculated rate</f:facet>
                <h:outputText value="#{_travel.calculatedRate}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.createDate}">
                <f:facet name="header">Create date</f:facet>
                <h:outputText value="#{_travel.createDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_travel.modifyDate}">
                <f:facet name="header">Modify date</f:facet>
                <h:outputText value="#{_travel.modifyDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_travel.deleteDate}">
                <f:facet name="header">Delete date</f:facet>
                <h:outputText value="#{_travel.deleteDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_travel.cronExpression}">
                <f:facet name="header">Cron expression</f:facet>
                <h:outputText value="#{_travel.cronExpression}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.monday}">
                <f:facet name="header">Monday</f:facet>
                <h:outputText value="#{_travel.monday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.tuesday}">
                <f:facet name="header">Tuesday</f:facet>
                <h:outputText value="#{_travel.tuesday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.wednesday}">
                <f:facet name="header">Wednesday</f:facet>
                <h:outputText value="#{_travel.wednesday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.thursday}">
                <f:facet name="header">Thursday</f:facet>
                <h:outputText value="#{_travel.thursday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.friday}">
                <f:facet name="header">Friday</f:facet>
                <h:outputText value="#{_travel.friday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.saturday}">
                <f:facet name="header">Saturday</f:facet>
                <h:outputText value="#{_travel.saturday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.sunday}">
                <f:facet name="header">Sunday</f:facet>
                <h:outputText value="#{_travel.sunday}"/>
            </rich:column>
            <rich:column sortBy="#{_travel.beginDate}">
                <f:facet name="header">Begin date</f:facet>
                <h:outputText value="#{_travel.beginDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_travel.endDate}">
                <f:facet name="header">End date</f:facet>
                <h:outputText value="#{_travel.endDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </rich:column>
            <rich:column sortBy="#{_travel.singleDay}">
                <f:facet name="header">Single day</f:facet>
                <h:outputText value="#{_travel.singleDay}"/>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selecttravel"
                     value="Select"
                      view="/Travel.xhtml">
                    <f:param name="travelIdTravel"
                            value="#{_travel.idTravel}"/>
                    <f:param name="travelFrom" value="State"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add travel"
                view="/TravelEdit.xhtml">
            <f:param name="stateIdState"
                    value="#{stateHome.instance.idState}"/>
            <f:param name="travelFrom" value="State"/>
        </s:button>
    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
